package edu.fiu.cis.personalize.server.objectrank;

import edu.fiu.cis.personalize.server.graph.NodeType;

public class NodeRef {

	private int id;

	private NodeType nodeType;

	public NodeRef(int id, NodeType nodeType) {
		super();
		this.id = id;
		this.nodeType = nodeType;
	}

	public int getId() {
		return id;
	}

	public NodeType getNodeType() {
		return nodeType;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result
				+ ((nodeType == null) ? 0 : nodeType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		NodeRef other = (NodeRef) obj;
		if (id != other.id)
			return false;
		if (nodeType != other.nodeType)
			return false;
		return true;
	}

}
